﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="modificationList.aspx.vb" Inherits="myWebsite.modificationlist" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
    <br />
</p>
<p>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ID" DataSourceID="MotorcyclesDb" AllowSorting="True">
        <Columns>
            <asp:TemplateField HeaderText="Make" SortExpression="Make">
                <ItemTemplate>
                    <b> <asp:Label ID="Label1" runat="server" Text='<%# Bind("Make") %>'></asp:Label>
                   
          
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("Model") %>'></asp:Label> </b>
                </ItemTemplate>
              
                <ItemStyle HorizontalAlign="Center" />
              
            </asp:TemplateField>
            <asp:BoundField DataField="Category" HeaderText="Category" 
                SortExpression="Category" >
            <HeaderStyle HorizontalAlign="Center" />
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="Description" HeaderText="Description" 
                SortExpression="Description" >
            <HeaderStyle HorizontalAlign="Center" />
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="Difficulty" HeaderText="Difficulty" 
                SortExpression="Difficulty" >
            <HeaderStyle HorizontalAlign="Center" />
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="Photo">
                <ItemTemplate>
                    <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("Picture") %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("Picture") %>'></asp:TextBox>
                </EditItemTemplate>
                <ControlStyle Height="200px" Width="300px" />
                <HeaderStyle HorizontalAlign="Center" />
            </asp:TemplateField>
            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                DataNavigateUrlFormatString="detail.aspx?ID={0}" HeaderText="More Details" 
                Text="Details" >
            <HeaderStyle HorizontalAlign="Center" />
            <ItemStyle HorizontalAlign="Center" />
            </asp:HyperLinkField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="MotorcyclesDb" runat="server" 
        ConnectionString="<%$ ConnectionStrings:MotorcyclesConn %>" 
        ProviderName="<%$ ConnectionStrings:MotorcyclesConn.ProviderName %>" 
        
        SelectCommand="SELECT [ID], [Make], [Model], [Category], [Description], [Difficulty], [Picture] FROM [MyTable]"></asp:SqlDataSource>
</p>
    <p>
        &nbsp;</p>
<p>
</p>
<p>
</p>
</asp:Content>
